package com.scsj.supermarket.view.activity.loginmodel;

import android.support.v7.app.AlertDialog;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.scsj.supermarket.R;
import com.scsj.supermarket.view.activity.baseactivitymodel.BaseActivity;


/**
 * 注册返回验证码
 */
public class SmsCodeRegisterActivity extends BaseActivity implements View.OnClickListener {


    private AlertDialog alertDialog;
    private Button code_next_btn;

    @Override
    protected void createView(Bundle savedInstanceState) {
        setContentView(R.layout.activity_sms_code_register);

        initToolbar();
        setToolbarTitle("手机号快速注册");
        hasBack(true);
    }

    @Override
    protected void initView() {
        code_next_btn = findViewById(R.id.code_next_btn);
        code_next_btn.setOnClickListener(this);


        final AlertDialog.Builder builder = new AlertDialog.Builder(
                SmsCodeRegisterActivity.this);
        View view = LayoutInflater.from(this).inflate(R.layout.pass_code_layout, null);
        TextView pass_code_tv = view.findViewById(R.id.pass_code_tv);
        pass_code_tv.setText("\u3000\u3000" + "5" + "\u3000" + "5" + "\u3000" + "5" + "\u3000" + "5" + "\u3000\u3000");

        Button passs_code_btn = view.findViewById(R.id.passs_code_btn);
        builder.setView(view);
        builder.setCancelable(false);
        alertDialog = builder.create();
        alertDialog.show();
        passs_code_btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                alertDialog.dismiss();
            }
        });

    }

    @Override
    protected void initListener() {

    }

    @Override
    protected void initData() {

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.code_next_btn:
                break;
        }
    }
}
